<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button>01</button><button>02</button><button>03</button>
    <script>
        console.log(aa);
        var aa = 1;
        const btn = document.querySelectorAll("button")
        console.log(btn);
        for(let i=0;i<btn.length;i++){
            btn[i].onclick = function(){
                console.log(i);
            }
        }
        const obj_1 = {
            name:"tom",
        }
        obj_1.sex = 'nan';
        console.log(obj_1);
        let obj_2 = {
            name:'liuliu'
        }
        obj_2 = {
            name:'xiaoli'
        }
        console.log(obj_2);

        // let {name,age}={
        //     name:'tom',
        //     age:18
        // }
        
        let obj={
            name:'tom',
            age:19
        }
        let {name}=obj;
        console.log(name);
        let {age}=obj;
        console.log(age);
        console.log(obj);
    </script>
</body>
</html>